<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-counter-add" autocomplete="off">
			<div class="form-group">	
				<label class="col-sm-3 control-label">生产线编号：</label>
				<div class="col-sm-8">
					<input id="code" name="code" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">累计数量：</label>
				<div class="col-sm-8">
					<input id="num" name="num" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">当前数量：</label>
				<div class="col-sm-8">
					<input id="num2" name="num2" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">时间：</label>
				<div class="col-sm-8">
					<!--<input id="thisTime" name="thisTime" class="form-control" type="text">-->
					<input type="text" class="form-control time-input" id="select_datetime1" placeholder="时间" name="thisTime"/>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "project/counter"
		$("#form-counter-add").validate({
			// rules:{
			// 	xxxx:{
			// 		required:true,
			// 	},
			// }
			rules: {
				code: {
					required: true,
				},
				num2: {
					required: true,
				}
			},
			messages: {
				code: {
					required: "请输入生产线编号",
				},
				num2: {
					required: "请输入当前数量",
				}
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-counter-add').serialize());
	        }
	    }
	</script>
</body>
</html>
